/*------------------------------------*\
    $SELECT
\*------------------------------------*/
/**
 * Basic select structural styling. 
 * http://robdel12.github.io/DropKick/
 * 
 * Designed and built @kurenn  
 */

// One container to bind them
.dk_container {
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 10px;
  outline: none;
  width: 220px;
  margin-left: 0;
}

// Opens the dropdown and holds the menu label
.dk_toggle {
  background-color: $select-bg;
  color: $select-text-color;
  @include border-radius(6px);
  overflow: hidden;
  padding: 11px 45px 11px 13px;
  text-decoration: none;
  white-space: nowrap;
  @include transition(0.25s);
  &:hover,
  &:focus,
  .dk_focus & {
    background-color: scale-color($select-bg, $lightness: 4%);
    color: $select-text-color;
    outline: none;
  }
  &:active {
    background-color: scale-color($select-bg, $lightness: -4%);
    outline: none;
    .select-icon {
      border-left-color: transparent;
    }
  }
}

// Dropdown icon (arrow by default)
.select-icon {
  background: $select-bg url("../img/toggle.png") no-repeat right center;
  border-left: 2px solid rgba($select-options-bg, 0.15);
  border-radius: 0 6px 6px 0;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  width: 42px;
  @include transition(0.25s);
}

// Applied whenever the dropdown is open
.dk_open {
  // Dropdown menu is covered by something. Try setting this value higher
  z-index: 10;
  .dk_toggle {
    background-color: $select-bg;
    .select-icon {
      background-color: scale-color($select-bg, $lightness: -4%);
      border-left-color: transparent;
    }
  }
}

// The outer container of the options
.dk_options {
  padding-top: 14px;
  // Dropdown triangle ear
  @include dropdown-arrow;
  &:before {
    left: auto;
    right: 12px;
  }
  li {
    padding-bottom: 3px;
  }
  a {
    @include border-radius(3px);
    color: $select-text-color;
    display: block;
    padding: 5px 9px;
    text-decoration: none;
    &:hover {
      background-color: $select-bg;
    }
  }
}

.dk_option_current a {
  background-color: $select-bg;
}

// Inner container for options, this is what makes the scrollbar possible.
.dk_options_inner {
  background-color: $select-options-bg;
  @include border-radius(5px);
  margin: 0;
  max-height: 244px;
  padding: 3px 3px 0;
}

// Set a max-height on the options inner
.dk_touch .dk_options {
  max-height: 250px;
}

//-------  End Theme --------

//------- Critical to the continued enjoyment of working dropdowns --------
.dk_container {
  display: none;
  position: relative;
  vertical-align: middle;
  &.dk_shown {
    @include inline-block;
  }
}

.dk_toggle {
  display: block;
  position: relative;
}

.dk_open {
  position: relative;
  .dk_options {
    margin-top: -1px;
    opacity: 1;
    z-index: 10;
    // Opacity fallback for IE
    display: block\9;
  }
  .dk_label {
    color: inherit;
  }
}

.dk_options {
  margin-top: -21px;
  position: absolute;
  left: 0;
  opacity: 0;
  width: 220px;
  z-index: -100;
  // Opacity fallback for IE
  display: none\9;
  @include transition(0.3s ease-out);
  // Align by right
  .select-right & {
    left: auto;
    right: 0;
  }
  a {
    display: block;
  }
}

.dk_options_inner {
  overflow: auto;
  outline: none;
  position: relative;
}

.dk_touch {
  .dk_options {
    overflow: hidden;
  }
  .dk_options_inner {
    max-height: none;
    overflow: visible;
  }
}

.dk_fouc select[data-furatto='select'] {
  position: relative;
  top: -99999em;
  visibility: hidden;
}

//
select {
  margin-bottom: 8px;
}
